Coral Controls

Tips
Drag to orbit • Shift+Drag to pan • Wheel to zoom
15 focus a style • R regenerate • Space pause
Running tests…

How It Works

This enhanced version keeps your five growth archetypes and adds a seeded generator, camera controls, global water sway, and a configurable control panel. You can tune depth, thickness, branch length, and growth speed, then regenerate deterministic reefs with the same seed. A lightweight particle school gives ambient life, and subtle shadows & fog sell the underwater vibe.

  • RANDOM_SPREAD: Divergent branching with slight upward bias.
  • SPIRAL: Rotational divergence with helical lift.
  • SINE_BENT: Direction perturbed by sine functions.
  • DOUBLE_HELIX: Paired twisting trajectories.
  • WIND_SWAY: Side‑to‑side bias that reads as current.

Performance notes: geometry & materials are reused where possible; updates run only for live branches; renderer uses sRGB output, soft shadows, and exponential fog.

About This Simulation

Inspired by natural coral morphogenesis, this demo explores how a handful of deterministic vector rules can generate diverse forms. The control panel invites quick iteration over growth parameters to discover compact, bushy structures or taller, lacier fans. All code lives in this single file for easy remixing.